package org.aepscolombia.platform.models.entityservices;
// Generated Apr 22, 2014 3:07:06 PM by Hibernate Tools 3.2.1.GA


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * SfGuardUser generated by hbm2java
 */
@Entity
@Table(name="sf_guard_user"
    , uniqueConstraints = @UniqueConstraint(columnNames={"username", "deleted_at"}) 
)
public class SfGuardUser  implements java.io.Serializable {


     private Long id;
     private SfGuardUser sfGuardUserByCreatedBy;
     private SfGuardUser sfGuardUserByUpdatedBy;
     private SfGuardUser sfGuardUserByDeletedBy;
     private String emailAddress;
     private String firstName;
     private String lastName;
     private String algorithm;
     private String salt;
     private String password;
     private Boolean isSuperAdmin;
     private Date lastLogin;
     private String username;
     private Boolean isActive;
     private Date createdAt;
     private Date updatedAt;
     private Date deletedAt;
     private Boolean canLogin;

    public SfGuardUser() {
    }
    
    public SfGuardUser(String emailAddress, String firstName, String lastName, String algorithm, String salt, String password, Boolean isSuperAdmin, String username, Boolean isActive, Date createdAt, Date updatedAt, Boolean canLogin) {
        this.emailAddress = emailAddress;
        this.firstName = firstName;
        this.lastName = lastName;
        this.algorithm = algorithm;
        this.salt = salt;
        this.password = password;
        this.isSuperAdmin = isSuperAdmin;
        this.username = username;
        this.isActive = isActive;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
        this.canLogin = canLogin;
    }    
	
    public SfGuardUser(String algorithm, String username, Boolean isActive) {
        this.algorithm = algorithm;
        this.username = username;
        this.isActive = isActive;
    }
    public SfGuardUser(SfGuardUser sfGuardUserByCreatedBy, SfGuardUser sfGuardUserByUpdatedBy, SfGuardUser sfGuardUserByDeletedBy, String emailAddress, String firstName, String lastName, String algorithm, String salt, String password, Boolean isSuperAdmin, Date lastLogin, String username, Boolean isActive, Date createdAt, Date updatedAt, Date deletedAt, Boolean canLogin) {
       this.sfGuardUserByCreatedBy = sfGuardUserByCreatedBy;
       this.sfGuardUserByUpdatedBy = sfGuardUserByUpdatedBy;
       this.sfGuardUserByDeletedBy = sfGuardUserByDeletedBy;
       this.emailAddress = emailAddress;
       this.firstName = firstName;
       this.lastName = lastName;
       this.algorithm = algorithm;
       this.salt = salt;
       this.password = password;
       this.isSuperAdmin = isSuperAdmin;
       this.lastLogin = lastLogin;
       this.username = username;
       this.isActive = isActive;
       this.createdAt = createdAt;
       this.updatedAt = updatedAt;
       this.deletedAt = deletedAt;
       this.canLogin = canLogin;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id", unique=true, nullable=false)
    public Long getId() {
        return this.id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="created_by")
    public SfGuardUser getSfGuardUserByCreatedBy() {
        return this.sfGuardUserByCreatedBy;
    }
    
    public void setSfGuardUserByCreatedBy(SfGuardUser sfGuardUserByCreatedBy) {
        this.sfGuardUserByCreatedBy = sfGuardUserByCreatedBy;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="updated_by")
    public SfGuardUser getSfGuardUserByUpdatedBy() {
        return this.sfGuardUserByUpdatedBy;
    }
    
    public void setSfGuardUserByUpdatedBy(SfGuardUser sfGuardUserByUpdatedBy) {
        this.sfGuardUserByUpdatedBy = sfGuardUserByUpdatedBy;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="deleted_by")
    public SfGuardUser getSfGuardUserByDeletedBy() {
        return this.sfGuardUserByDeletedBy;
    }
    
    public void setSfGuardUserByDeletedBy(SfGuardUser sfGuardUserByDeletedBy) {
        this.sfGuardUserByDeletedBy = sfGuardUserByDeletedBy;
    }
    
    @Column(name="email_address")
    public String getEmailAddress() {
        return this.emailAddress;
    }
    
    public void setEmailAddress(String emailAddress) {
        this.emailAddress = emailAddress;
    }
    
    @Column(name="first_name")
    public String getFirstName() {
        return this.firstName;
    }
    
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }
    
    @Column(name="last_name")
    public String getLastName() {
        return this.lastName;
    }
    
    public void setLastName(String lastName) {
        this.lastName = lastName;
    }
    
    @Column(name="algorithm", nullable=false, length=128)
    public String getAlgorithm() {
        return this.algorithm;
    }
    
    public void setAlgorithm(String algorithm) {
        this.algorithm = algorithm;
    }
    
    @Column(name="salt", length=128)
    public String getSalt() {
        return this.salt;
    }
    
    public void setSalt(String salt) {
        this.salt = salt;
    }
    
    @Column(name="password", length=128)
    public String getPassword() {
        return this.password;
    }
    
    public void setPassword(String password) {
        this.password = password;
    }
    
    @Column(name="is_super_admin")
    public Boolean getIsSuperAdmin() {
        return this.isSuperAdmin;
    }
    
    public void setIsSuperAdmin(Boolean isSuperAdmin) {
        this.isSuperAdmin = isSuperAdmin;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="last_login", length=19)
    public Date getLastLogin() {
        return this.lastLogin;
    }
    
    public void setLastLogin(Date lastLogin) {
        this.lastLogin = lastLogin;
    }
    
    @Column(name="username", nullable=false, length=125)
    public String getUsername() {
        return this.username;
    }
    
    public void setUsername(String username) {
        this.username = username;
    }
    
    @Column(name="is_active", nullable=false)
    public Boolean isIsActive() {
        return this.isActive;
    }
    
    public void setIsActive(Boolean isActive) {
        this.isActive = isActive;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="created_at", length=19)
    public Date getCreatedAt() {
        return this.createdAt;
    }
    
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="updated_at", length=19)
    public Date getUpdatedAt() {
        return this.updatedAt;
    }
    
    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="deleted_at", length=19)
    public Date getDeletedAt() {
        return this.deletedAt;
    }
    
    public void setDeletedAt(Date deletedAt) {
        this.deletedAt = deletedAt;
    }
    
    @Column(name="can_login")
    public Boolean getCanLogin() {
        return this.canLogin;
    }
    
    public void setCanLogin(Boolean canLogin) {
        this.canLogin = canLogin;
    }

}


